<?php /* Smarty version Smarty-3.1.13, created on 2013-05-04 10:30:27
         compiled from ".\templates\itemImage2.tpl" */ ?>
<?php /*%%SmartyHeaderCode:272335184b5f4ea3f30-52724364%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '99df1a13fe1e069d710a333de261301ee3016d17' => 
    array (
      0 => '.\\templates\\itemImage2.tpl',
      1 => 1367663416,
      2 => 'file',
    ),
    '9d3840acd837a27297ba054f8bc546ea8525850a' => 
    array (
      0 => 'D:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\hirenbhai\\templates\\main.tpl',
      1 => 1367622655,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '272335184b5f4ea3f30-52724364',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.13',
  'unifunc' => 'content_5184b5f515fae1_77785153',
  'variables' => 
  array (
    's_activId' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5184b5f515fae1_77785153')) {function content_5184b5f515fae1_77785153($_smarty_tpl) {?><?php if (!is_callable('smarty_function_html_options')) include 'D:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\hirenbhai\\include\\smarty\\libs\\plugins\\function.html_options.php';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<title>!! HIRENBHAI !!</title>
<link rel="stylesheet" type="text/css" href="./css/main.css" />
<link rel="stylesheet" type="text/css" href="./css/style.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<link rel="stylesheet" href="css/style1.css" media="screen">
	<style type="text/css">
		html, body { margin: 0;	padding: 0; }
		ul.menu { margin: 0px auto 0 auto; }
	</style>
	</head>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
 
  function itemAjax(itemVal)
  {
  	$.ajax({
  	  url:'ajaxRisponceItem.php',
  	  data:'itemVal='+itemVal,
  	  type:'POST',
  	  
  	  success:function(msg){
  	  	$('.sizeSelect').html(msg);
  	  }
    });
  }
  
  function sizeAjax(sizeVal)
  {
    var itemVal    = $("#item").val();
    var dataString = 'sizeVal='+sizeVal + '&itemVal=' + itemVal;
    $.ajax({
  	  url:'ajexResponceSize.php',
      data: dataString,
  	  type:'POST',
  	  
  	  success:function(msg){
  	  $('.companySelect').html(msg);
  	  }
    });
  }
  
  function companyAjax(companyVal)
  {
  	var itemVal = $("#item").val();
  	var sizeVal = $("#size").val();
  	var dataString = 'companyVal='+companyVal + '&itemVal=' + itemVal + '&sizeVal=' + sizeVal ;
  	$.ajax({
  	  url:'ajaxRisponceIcompany.php',
      data: dataString,
  	  type:'POST',
  	  
  	  success:function(msg){
  	  	$('.qualitySelect').html(msg);
  	  }
    });
  }
  
  function qualityAjax(qualityVal)
  {
  	var itemVal    = $("#item").val();
  	var sizeVal    = $("#size").val();
  	var companyVal = $("#company").val();
  	var dataString = '&qualityVal='+ qualityVal + '&companyVal='+ companyVal + '&itemVal=' + itemVal + '&sizeVal=' + sizeVal ;
  	$.ajax({
  	  url:'ajaxResponceQuality.php',
      data: dataString,
  	  type:'POST',
  	  
  	  success:function(msg){
  	  	$('#color').html(msg);
  	  }
    });
  }
  function myFunction()
  {
    if(confirm("You Want To Remove This Record")== true)
	  {
		  return true;
	  }
	  else
	  {
		  return false;
	  }
  }

function setAmount(rateObj)
{
	var row = $(rateObj).parents('.one');
	var quantity = parseFloat($(row).find('#quantity').val());
	var rate     = parseFloat($(rateObj).val());
	var amount = 0;

	if(!isNaN(quantity) && !isNaN(rate))
	{
		amount = (quantity * rate);
		row.find('.amount').val(amount.toFixed(2));
	}
	else
		row.find('.amount').val('');
}

function setColumnTotal()
{
  var totalQty    = 0;
  var totalAmount = 0;	
  
  $('.quantity').each(function(i)
  {
    quantity = $(this).val().replace("$","");
    if(!isNaN(quantity))
    {
    	totalQty+= Number(quantity);
    }
  }); 
    
  $('.amount').each(function(i)
  {
    amount = $(this).val().replace("$","");
    if(!isNaN(amount))
    {
    	totalAmount+= Number(amount);
    }
  });

  $('#totalQty').val(totalQty.toFixed(0));
  $('#totalAmount').val(totalAmount.toFixed(2));
}
</script>



<?php if (strlen($_smarty_tpl->tpl_vars['s_activId']->value)>0){?>
<div id="headerContent">
  <div id="headingData"><br>
  	<a href="bill.php"></a>
  </div>
</div>
<body>
	<ul class="menu">
	  <li><a href="#"> Master</a>
	    <ul>
	    	 <li><a href="item.php" align="left"> Item</a></li>
	    	 <li><a href="size.php"  align="left">Size</a></li>
	    	 <li><a href="company.php"  align="left">Company</a></li>
	    	 <li><a href="quality.php"  align="left">Quality</a></li>
	    	 <li><a href="color.php"  align="left">Color</a></li>
	       <li><a href="itemImage.php"  align="left">Item Image</a></li>
	       
      </ul>
    </li>
	  <li><a href="party.php"> Party</a><li>
	  <li><a href="order.php"> Order</a><li>
	  <li><a href="orderlist.php"> Order List</a><li>
	  <li><a href="bill.php">Bill</a></li>
	  <li><a href="logout.php">Logout</a><li>
  </ul>
</body>
<?php }?>


<form name="party" action="<?php echo $_SERVER['PHP_SELF'];?>
" method="post" enctype="multipart/form-data">
<table align="center" border="1" cellpadding="2" cellspacing="2" >
  <tr>
    <td align="center" class="table1" colspan="6">Item Image</td>
  </tr>
  <tr>
    <th class="table2">Item</th>
    <th class="table2">Size</th>
    <th class="table2">Company</th>
    <th class="table2">Quality</th>
    <th class="table2">Color</th>
    <th class="table2">Image</th>
  </tr>
  <tbody id="mainDiv">
<!--===========Item Select box ===============-->	
     <tr id="one" class="one">
    <th align="left" class="table2">Item :
	    <select name="itemId[]" id="itemSelect" class="itemSelect"  onchange="itemAjax(this.value)" autofocus>
	      <option value="0">Select Item</option>
	      <?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->tpl_vars['itemArray']->value['itemId'],'output'=>$_smarty_tpl->tpl_vars['itemArray']->value['itemName']),$_smarty_tpl);?>

      </select>
    </th>
<!--Size Select box 1-->	
    <th class="table2">Size :
      <select  name="sizeId[]" id="sizeSelect" class=" add sizeSelect" onchange="val(this.value)">
    	  <option value="0">Select Size</option>
    	  <?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->tpl_vars['size']->value['sizeId'],'output'=>$_smarty_tpl->tpl_vars['size']->value['sizeName']),$_smarty_tpl);?>

    	</select>
    </th>
<!--Company Select box 1-->	
    <th class="table2">Company :
      <select  name="companyId[]" id="companySelect" class="companySelect" onchange="companyAjax(this.value)" >
    	  <option value="0">Select Company</option>
    	  <?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->tpl_vars['companys']->value['companyId'],'output'=>$_smarty_tpl->tpl_vars['companys']->value['companyName']),$_smarty_tpl);?>

    	</select>
    </th>
<!--Quality Select box 1-->	
    <th class="table2">Quality :
      <select  name="qualityId[]" class="qualitySelect" onchange="qualityAjax(this.value)">
    	  <option value="0">Select</option>
    	  <?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->tpl_vars['quality']->value['qualityId'],'output'=>$_smarty_tpl->tpl_vars['quality']->value['qualityName']),$_smarty_tpl);?>

      </select>
    </th>
<!--Color Select box 1-->
    <th class="table2">Color :
    	<select  name="colorName[]" class="colorSelect">
    	  <option value="0">Select</option>
    	  <?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->tpl_vars['color']->value['colormainId'],'output'=>$_smarty_tpl->tpl_vars['color']->value['colormainName']),$_smarty_tpl);?>

      </select>
    </th>
     <th class="table2">Image : <input type="file" name="image[]"/></th>
  </tr>  
  </tbody>
  <tr>
    <td class="table1" align="center" colspan="9" ><input type="submit" name="submitBtn" value="Submit" class="button" /></td>
  </tr>
</table>
</form>
  <br />
  <br />
<table align="center" border="2" cellpadding="2" cellspacing="2" width="" >
<tr>
  <td align="center" class="table1" colspan="13"><b> Image Master</b></td>
</tr>
<tr>
  <td class="table2" NOWRAP><b></b></td>
  <td class="table2" NOWRAP><b>Item 	</b></td>
  <td class="table2" NOWRAP><b>Size </b></td>
	<td class="table2" NOWRAP><b>Company </b></td>
  <td class="table2" NOWRAP><b>Quality </b></td>
  <td class="table2" NOWRAP><b>Color  </b></td>
  <th class="table2" align="center">Image</th>
</tr>
 <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['name'] = "sec";
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop'] = is_array($_loop=$_smarty_tpl->tpl_vars['colorArray']->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']["sec"]['total']);
?>
<tr>
  <td class="table2" align="center"><a href="colorDelete.php?colorId=<?php echo $_smarty_tpl->tpl_vars['colorArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['colorId'];?>
" onclick="return myFunction();"class="link"> <img src="./images/deleteIco.png"></a></td>
  <td class="table2"NOWRAP><?php echo $_smarty_tpl->tpl_vars['colorArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['itemName'];?>
</td>
  <td class="table2"NOWRAP><?php echo $_smarty_tpl->tpl_vars['colorArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['sizeName'];?>
</td>
  <td class="table2"NOWRAP><?php echo $_smarty_tpl->tpl_vars['colorArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['companyName'];?>
</td>
  <td class="table2"NOWRAP><?php echo $_smarty_tpl->tpl_vars['colorArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['qualityName'];?>
</td>
  <td class="table2"NOWRAP><?php echo $_smarty_tpl->tpl_vars['colorArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['colorName'];?>
</td>
  <td class="table2" ><img src="images/img/<?php echo $_smarty_tpl->tpl_vars['colorArray']->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec']['index']]['itemImage'];?>
" height="50" width="50" ></td>
</tr>
<?php endfor; endif; ?>
</table>

</body>
</html><?php }} ?>